﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Diagnostics;

public partial class ZHCX_ZHTJ : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  {
    Stopwatch sw = new Stopwatch();
    sw.Start();
    //代码部分

    if (!Page.IsPostBack)
    {
      if (!ProjectPrivate.GetQX("17"))
      {
        Server.Transfer("~\\blank.aspx");
      }
      date1.Date = CommonUse.GetYC();
      date2.Date = CommonUse.GetYM();
    }
    BindGrid();

    sw.Stop();
    //Response.Write("本次执行共耗时:" + sw.ElapsedMilliseconds + "毫秒！");
  }

  protected void BindGrid()
  {
    DataSet ds = ZHCX.GetDS(date1.Text, date2.Text);
    ASPxGridView1.DataSource = ds;
    ASPxGridView1.DataBind();
  }

  protected void btnQuery_Click(object sender, EventArgs e)
  {

  }

  protected void btnExport_Click(object sender, EventArgs e)
  {
    this.ASPxGridViewExporter1.WriteXlsToResponse();
  }
}
